CP-53446: Split plug and unplug atomics to enable live migration downtime reduction later#6362
Conversation
|
It helps when reviewing to add the reason for the change into the PR:
|
65ec25e to
0926423
Compare
|
I've added comments to make things clearer and cleaned some things up. I've also consolidated the two flags into one because I can't see a situation where we would need to split one and not the other. |
3a6d281 to
17bca64
Compare
17bca64 to
faea8ea
Compare
faea8ea to
8906fbb
Compare
|
The changes seem good, but the commit messages are a bit too bare, could you add more context to them? |
8906fbb to
71f220e
Compare
Signed-off-by: Steven Woods <steven.woods@cloud.com>
This consists of two parts, splitting the attach_and_activate into functionally equivalent attach and activate functions, and splitting the VBD_plug atomic itself's behaviour into two new atomics, VBD_attach and VBD_activate. If the new xenopsd_vbd_plug_unplug_legacy flag is true, the only difference will be that VBD_plug calls attach and activate sequentially instead of attach_and_activate. If xenopsd_vbd_plug_unplug_legacy is false, the VBD_attach and VBD_activate atomics will be used in place of VBD_plug in all places that it is used. This should still be functionally equivalent. The purpose of this change is to allow optimisations in this area as there are some situations where they do not need to be called at the same time. For example VBD_attach could be called outside of VM migrate downtime to reduce the overall downtime. Signed-off-by: Steven Woods <steven.woods@cloud.com>
This consists of two parts, splitting the unplug function into functionally equivalent deactivate and detach functions, and splitting the VBD_unplug atomic itself's behaviour into two new atomics: VBD_deactivate and VBD_detach If the xenopsd_vbd_plug_unplug_legacy flag is true, the only difference will be that VBD_unplug calls deactivate and detach sequentially instead of unplug If xenopsd_vbd_plug_unplug_legacy is false, the VBD_deactivate and VBD_detach atomics will be used in place of VBD_unplug in all places that it is used. This should still be functionally equivalent. The purpose of this change is to allow optimisations in this area as there are some situations where they do not need to be called at the same time. For example we could skip detaching on reboot and only deactivate and activate again reducing reboot time. Signed-off-by: Steven Woods <steven.woods@cloud.com>
71f220e to
1a46f33
Compare
edwintorok
left a comment
There was a problem hiding this comment.
This is disabled by default, so should be safe to merge.
Split the plug and unplug atomics into separate attach/activate and deactivate/detach atomics. This is gated by two separate flags and both are switched off by default. When switched on, this should still be a no-op by calling them in serial where plug/unplug are currently used, but will allow us to later use these atomics separately elsewhere for optimisation.
Opening this as a draft PR as plug/unplug is fundamental so the logic needs to be watertight before we consider merging.